package com.ws.boot.demo.validate.service.i18n;


import com.ws.boot.validate.annotation.ValidComponent;
import com.ws.boot.web.domain.DefaultResponse;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * i18n 业务类 .
 *
 * @className: I18nService
 * @author: ws
 * @date: 2020/4/9 11:03
 * @version: 1.0.0
 */
@ValidComponent
public interface I18nService {

    /**
     * 默认消息 .
     * @param username
     * @param password
     * @author ws
     * @date 2020/4/9 11:22
     * @return DefaultResponse
     **/
    DefaultResponse defaultMessage(@NotBlank String username, @Null(message = "密码必须为空啊") String password);

    /**
     * 默认消息加自定义参数 .
     * @param username2
     * @param password2
     * @author ws
     * @date 2020/4/9 11:29
     * @return DefaultResponse
     **/
    DefaultResponse defaultMessageWithCustomParameter(@NotBlank String username2, @Null String password2);

    /**
     * 默认消息加parameterKey自定义参数 .
     * @param username2
     * @param password2
     * @author ws
     * @date 2020/4/9 11:29
     * @return DefaultResponse
     **/
    DefaultResponse defaultMessageWithParameterKey(@NotBlank String username2, @Null String password2);

    /**
     * 自定义消息加自定义参数 .
     * @param age
     * @param hobbies
     * @author ws
     * @date 2020/4/9 11:34
     * @return DefaultResponse
     **/
    DefaultResponse customMessageWithCustomParameter(@Min(18) Integer age
            , @Size(min = 1, max = 3) List<String> hobbies);

    /**
     * 组合注解加parameterKey自定义参数 .
     * @param mobile
     * @param maxnervaEmail
     * @param maxnervaEmail2
     * @author ws
     * @date 2020/4/16 16:00
     * @return DefaultResponse
     **/
    DefaultResponse composingConstraintWithParameterKey(String mobile
            , String maxnervaEmail
            , String maxnervaEmail2);

}
